'use strict';

stareal
    .controller("VenusGaoController", function ($scope,$interval,$document, $stateParams, $api, $sce, base64, $state, $alert,localStorageService,$timeout) {
         // var height=(document.body.clientHeight-parseInt(document.documentElement.style.fontSize)*1.3)+'px';
        $scope.venus360Id=$stateParams.id;
        var height=document.body.clientHeight+'px';
        var wid=document.body.clientWidth+'px';
        // $("#venusGaoconIframe").height(height);
        // $("#venusGaoconIframe").width(document.body.clientWidth);
        $scope.sectLog=$stateParams.sectLog;
        $scope.sectLat=$stateParams.sectLat;
        $scope.sectName=$stateParams.sectName;

        var url='https://m.amap.com/navi/?dest='+$scope.sectLog+','+$scope.sectLat+'&destName='+ $scope.sectName+'&key=aeb5020c023adc52c1c564d1c66aa85d';
    //    接受https://m.amap.com/navi/?dest=119.284567%2C26.019484&destName=%E7%A6%8F%E5%B7%9E%E6%B5%B7%E5%B3%A1%E5%A5%A5%E6%9E%97%E5%8C%B9%E5%85%8B%E4%BD%93%E8%82%B2%E4%B8%AD%E5%BF%83%E7%BB%BC%E5%90%88%E9%A6%86&key=59ca8a781dba9f928faceafddbb2bf52
       if($scope.sectLog!=undefined&&$scope.sectLat!=undefined&&$scope.sectLog!=''&&$scope.sectLat!=''){
           $("#venusGaocontainer").html('<iframe src="'+url+'" frameborder="0"  id="venusGaoconIframe" width="'+wid+'" height="'+height+'" ></iframe>');
       }else{
           $("#venusGaocontainer").html('<iframe src="https://m.amap.com/index/index/" frameborder="0" width="'+wid+'" height="'+height+'" id="venusGaoconIframe"></iframe>');
       }
    })